package com.chag.app.biz.dao.gen;

import java.util.List;
import org.apache.ibatis.annotations.Delete;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Param;
import org.apache.ibatis.annotations.ResultMap;
import org.apache.ibatis.annotations.Select;
import org.apache.ibatis.annotations.Update;

public interface ProfessionTypeMapper {
    int countByExample(ProfessionTypeCriteria example);

    int deleteByExample(ProfessionTypeCriteria example);

    @Delete({
        "delete from z_professiontype",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int deleteByPrimaryKey(Integer id);

    @Insert({
        "insert into z_professiontype (id, prof_type_dec, ",
        "prof_type_name)",
        "values (#{id,jdbcType=INTEGER}, #{profTypeDec,jdbcType=VARCHAR}, ",
        "#{profTypeName,jdbcType=VARCHAR})"
    })
    int insert(ProfessionType record);

    int insertSelective(ProfessionType record);

    List<ProfessionType> selectByExample(ProfessionTypeCriteria example);

    @Select({
        "select",
        "id, prof_type_dec, prof_type_name",
        "from z_professiontype",
        "where id = #{id,jdbcType=INTEGER}"
    })
    @ResultMap("BaseResultMap")
    ProfessionType selectByPrimaryKey(Integer id);

    int updateByExampleSelective(@Param("record") ProfessionType record, @Param("example") ProfessionTypeCriteria example);

    int updateByExample(@Param("record") ProfessionType record, @Param("example") ProfessionTypeCriteria example);

    int updateByPrimaryKeySelective(ProfessionType record);

    @Update({
        "update z_professiontype",
        "set prof_type_dec = #{profTypeDec,jdbcType=VARCHAR},",
          "prof_type_name = #{profTypeName,jdbcType=VARCHAR}",
        "where id = #{id,jdbcType=INTEGER}"
    })
    int updateByPrimaryKey(ProfessionType record);
}